package com.jymj.entity;

import com.jymj.entity.huji.ZhaiEntity;
import com.jymj.entity.zjd.ApplyEntity;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date;
import java.util.List;

@Data
public class YlEntity implements Serializable {
    private Long gid;
    private Integer objectid;
    private BigDecimal area;
    private String landType;
    private String mph;
    private String xzqmc;
    private String townname;
    private String remark;
    private Integer rk;
    private String name;
    private String fqd;
    private String code;
    private String center;
    private BigDecimal jianzhuArea;
    private Integer ylType;
    private Integer legent;
    private Integer isidle;
    private BigDecimal pzmj;
    private String pzbm;
    private String pzwh;
    private Date pzsj;
    private BigDecimal pzyt;
    private Integer qsxz;
    private Integer syqlx;
    private Integer tdly;
    private Integer hasoccupy;
    private Integer cqly;
    private Integer zhaiid;
    private String hzmc;
    private Integer yllegent;
    private Integer nongcount;
    private Integer feinongcount;
    private Integer hucount;
    private Integer dlr;
    private BigDecimal shapeArea;
    private Integer ds;
    private String geometry;
    private Boolean fj;
    private Integer apptype;//翻建步骤
    private String qszsh;//权属证书号
    private String czqk;//宅基地处置情况
    private Integer czqkint;//宅基地处置情况
    private List<ApplyEntity> applyEntities;
    private List<ZhaiEntity> zhaiEntities;
    private ZhaiEntity zhaiEntity;//户主信息


    //无用
    private List<Integer> qsxzList;
    private List<Integer> syqlxList;
    private List<Integer> cqlyList;

    public BigDecimal getArea() {
        return area == null ? BigDecimal.ZERO : area.setScale(2, RoundingMode.HALF_UP);
    }

    public BigDecimal getJianzhuArea() {
        return jianzhuArea == null ? BigDecimal.ZERO : jianzhuArea.setScale(2, RoundingMode.HALF_UP);
    }

    public BigDecimal getPzmj() {
        return pzmj == null ? BigDecimal.ZERO : pzmj.setScale(2, RoundingMode.HALF_UP);
    }

    public BigDecimal getPzyt() {
        return pzyt == null ? BigDecimal.ZERO : pzyt.setScale(2, RoundingMode.HALF_UP);
    }

    public BigDecimal getShapeArea() {
        return shapeArea;
    }
}
